package com.ikas.ai.server.module.appraise.controller;

import com.ikas.ai.handle.JsonResult;
import com.ikas.ai.server.module.appraise.service.AppraiseResultService;
import com.ikas.ai.server.module.appraise.service.AppraiseSceneResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 驾驶舱
 * @author hubowei
 * @email hu.bowei@ikasinfo.com
 * @date 2023-2-7 17:37:34
 */
@RestController
@RequestMapping("/appraise/dash")
public class DashboardController {

    @Autowired
    private AppraiseResultService appraiseResultService;

    @Autowired
    private AppraiseSceneResultService appraiseSceneResultService;

    /**
     * 评价总览
     *
     * @return 通用返回
     */
    @GetMapping("/overViewList")
    public String overViewList() {
        return JsonResult.success(appraiseResultService.overViewList());
    }

    /**
     * 评价总览详情
     *
     * @return 通用返回
     */
    @GetMapping("/overView/detail")
    public String overViewDetail(@RequestParam("id") Long id) {
        return JsonResult.success(appraiseSceneResultService.overViewDetail(id));
    }
}
